package cn.wolfcode.luowowo.article.service;

import cn.wolfcode.luowowo.article.domain.StrategyDetail;
import cn.wolfcode.luowowo.article.domain.Travel;
import cn.wolfcode.luowowo.common.query.TravelQueryObject;
import cn.wolfcode.luowowo.common.util.AjaxResult;
import cn.wolfcode.luowowo.member.domain.UserInfo;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface ITravelService {
    /**
     * 分页查询
     * @param qo
     * @return
     */
    PageInfo query(TravelQueryObject qo);

    /**
     * 根据游记id查询
     * @param travelId
     * @return
     */
    Travel selectById(Long travelId);

    /**
     * 根据目的地id获取点击量前三的游记
     * @param destId
     * @return
     */
    List<StrategyDetail> listViewnumTop3(Long destId);

    /**
     * 新增或者修改
     * @param travel
     */
    AjaxResult savaOrUpdate(Travel travel);

    /**
     * 获取所有攻略
     * @return
     */
    List<Travel> list();

    PageInfo<Travel> queryforUid(TravelQueryObject qo);

    /**
     * 查询用户总游记数
     * @param uid
     * @return
     */
    Integer getTraveltotalByUid(Long uid);

    Integer getReplynumtotalByUid(Long uid);

    Integer getViewnumtotalByUid(Long uid);

    List<Travel> getTravelsById(Long uid);


    void updateTravelStats(Travel travel);
}
